package demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        Person person = new Person();
        person.sayHi();

        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("demo");
        Person person1 = context.getBean(Person.class);
        person1.sayHi();
    }
}
